﻿@using KMF.WebUI.Areas.KMFadmin.Models
@using KMF.WebUI.Areas.KMFadmin.CustomHelpers
@model KMF.Common.ProductCategoryMapLinkDto
@{
    ViewBag.Title = "Thêm liên kết";
    Layout = "~/Areas/KMFadmin/Views/Shared/_layout.cshtml";
}
@section LeftMenu
{
    <div id="left">
        <div class="LeftMenuWraper">
            <div class="leftMenuHeader">
                <span style="padding-left: 10px;">
                    <strong>Truy cập nhanh</strong>
                </span>
            </div>
            <ul id="p-quick-menu" class="quick-menu">
                <li class="qmn-info-pro">
                    <a href="@Url.Action("Index", "AdminProductCategory")">Thông tin danh mục</a>
                </li>
                <li class="qmn-info-pro">
                    <a href="@Url.Action("CategoryBanner", "ADminProductCategory")">Banners category</a>
                </li>
                <li class="qmn-info-pro">
                    <a href="@Url.Action("TemplateList", "AdminProductCategory")">Template danh mục</a>
                </li>
                <li class="qmn-info-pro">
                    <a href="@Url.Action("Index", "AdminProductCategoryMapLink")">Liên kết danh mục</a>
                </li>
            </ul>
            <div class="leftMenuFooter"></div>
        </div>
    </div>
    <!-- END #left -->
}
<nav>
    <div id="jCrumbs" class="breadCrumb module">
        <ul>
            <li><a href="@Url.Action("Index","AdminHome")"><i class="bootstrap icon-home"></i></a></li>
            <li><a href="javascript:void(0)">Thêm liên kết mới</a> </li>
        </ul>
    </div>
</nav>
<div class="toolBox">
    @Html.ToolBox(new List<object> { new Save { ClassCss = "Save", ActionName = "Javascript:void(0)" }, new Back { ClassCss = "Back", ActionName = @Url.Action("Index", "AdminProductCategoryMapLink") } })
</div>
<div class="box-Info">
    <div class="Info-header">
        <span>Thêm mới liên kết</span>
    </div>

    <div class="Info-body ib-infopro">
        @using (Html.BeginForm("Add", "AdminProductCategoryMapLink", FormMethod.Post))
        {
            <table cellpadding="0" cellspacing="0" width="100%" border="0" class="table-info">
                <tr>
                    <td class="tInfoLeft">Tên liên kết</td>
                    <td class="tInfoRight">
                        @Html.TextBoxFor(m => m.Name)
                        @Html.ValidationMessageFor(m => m.Name)
                    </td>
                </tr>
                <tr>
                    <td class="tInfoLeft">Danh mục cha</td>
                    <td class="tInfoRight">
                        @Html.DropDownListFor(m => m.CategoryId, new SelectList((List<KMF.Common.ProductCategoryDto>)ViewBag.MenuList, "Id", "Name"))
                    </td>
                </tr>
                <tr>
                    <td class="tInfoLeft">Url</td>
                    <td class="tInfoRight">
                        @Html.TextBoxFor(m => m.Url)<br />
                        <i>Liên kết của danh mục</i>
                    </td>
                </tr>
                <tr>
                    <td class="tInfoLeft">Vị trí</td>
                    <td class="tInfoRight">
                        @Html.TextBoxFor(m => m.Position, new { @style = "width:150px;" })
                        <br />
                        <i>Top, Left, Right, Bottom</i>
                    </td>
                </tr>
                <tr>
                    <td class="tInfoLeft">Thứ tự</td>
                    <td class="tInfoRight">
                       @Html.TextBoxFor(m => m.Ordering, new { @style = "width:50px;", @Value = "0"})
                        <br />
                        <i>Thứ tự liên kết</i>
                    </td>
                </tr>
                <tr>
                    <td class="tInfoLeft">
                        Được hiển thị
                    </td>
                    <td class="tInfoRight">
                        @Html.CheckBoxFor(m => m.Active)
                    </td>
                </tr>
            </table>
        }
    </div>
</div>
@section scripts
{
    @Scripts.Render("~/bundles/KMFAdmin/jqueryval")
    <script type="text/javascript">
        SubmitFormUseToolBox($('#Toolbox li.Save a'), $('form'));
    </script>

}